package com.sinder.campus_prophet.service.jwgl;

import cc.lyceum.api.thxy.jwgl.ThxyJwgl;
import com.sinder.campus_prophet.core.global.ResponseMessage;
import com.sinder.campus_prophet.entity.jwgl.TbJwglInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sinder.campus_prophet.service.jwgl.bean.dto.BindJwglDto;
import com.sinder.campus_prophet.service.jwgl.bean.dto.SynJwglDto;

import javax.servlet.http.HttpServletRequest;
import java.sql.SQLException;

/**
* @author AS
* @description 针对表【tb_jwgl_info(用户教务账号密码)】的数据库操作Service
* @createDate 2023-03-15 23:13:21
*/
public interface TbJwglInfoService extends IService<TbJwglInfo> {
    /* 数据同步 同步教务系统数据/课表数据/绩点数据/考试安排 */
    ResponseMessage synJwglData(SynJwglDto synJwglDto, ThxyJwgl jwgl) throws SQLException;
    /* 绑定教务账号 */
    boolean bindJwgl(BindJwglDto bindJwgl);

    /*查询教务账号信息*/
    ResponseMessage getJwglInfo(String openId);

    /* 重新绑定，修改绑定信息 */
    boolean bindUpJwgl(BindJwglDto bindJwgl);

    /* 校验教务系统账号密码是否正确 */
    ThxyJwgl checkJwglLogin(String openId, HttpServletRequest request);
}
